package com.lan.test02;

//工人类
public class Worker {
    private String name;
    private Integer age;
    private Double wage;

    public Worker() {
    }

    public Worker(String name, Integer age, Double wage) {
        this.name = name;
        this.age = age;
        this.wage = wage;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Double getWage() {
        return wage;
    }

    public void setWage(Double wage) {
        this.wage = wage;
    }


    public String work(Integer time){
        System.out.println("今天工作了"+time+"小时");
        return "发工资了！";
    }
}
